Namespace.Use("Application.UI", function(ns) {
    var UI = Namespace.Import("UI");

    var Sensor = Namespace.Import("Application.Sensor");

    var Page = Namespace.Import("Application.UI.Page");
    var root = UI.Root.GetRootObject();

    var pages = Page.Sensors.GetPages();

    var grid = new UI.Object.GridContainer(pages.length, 1);

    for (var idx = 0; idx < pages.length; ++idx) {
        grid.AddChild(pages[idx]["Object"], idx, 0);
    }
    grid.AccessPosition(0, 0);
    root.AddChild(grid);


    function Event_OnRootResize() {
        var size = root.AccessSize();
        grid.AccessSize(size[0], size[1]);
    }

    root.RegisterEvent("Resize", function(width, height) {
        Event_OnRootResize();
    });

    Event_OnRootResize();
});